//package com.czf.testmodele.time.quartz;
//
//import cn.hutool.core.date.DatePattern;
//import cn.hutool.core.date.DateUtil;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//
//import java.util.Date;
//
///**
// * @author zfChen
// * @create 2022/6/9 9:42
// */
//@RestController
//@RequestMapping("/schedule")
//public class ScheduleController {
//
//    @Autowired
//    private IScheduleService scheduleService;
//
//    @RequestMapping("/send")
//    public String send(String startTime, String data) {
//        Date date = DateUtil.parse(startTime, DatePattern.NORM_DATETIME_FORMAT);
//        String jobName = scheduleService.scheduleFixTimeJob(PublishPostJob.class, date, data);
//        return jobName;
//    }
//
//    @RequestMapping("/scheduleJob")
//    public String scheduleJob(String cron, String data) {
//        String jobName = scheduleService.scheduleJob(CronProcessJob.class, cron, data);
//        return jobName;
//    }
//
//    @RequestMapping("/cancel")
//    public boolean cancelScheduleJob(String jobName) {
//        Boolean success = scheduleService.cancelScheduleJob(jobName);
//        return success;
//    }
//}
